<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>查询所有联系人页面</title>
    <script src="/js/vue.js"></script>
    <script src="/js/axios-0.18.0.js"></script>
</head>
<body>
<div id="app">
    <table border="1" cellpadding="0" cellspacing="0" width="800" align="center">
        <tr>
            <th>id</th>
            <th>姓名</th>
            <th>年龄</th>
            <th>性别</th>
            <th>地址</th>
            <th>qq</th>
            <th>邮箱</th>
        </tr>
        <tr v-for="(v,i) of linkManList" :key="v.id">
            <td>{{v.id}}</td>
            <td>{{v.name}}</td>
            <td>{{v.age}}</td>
            <td>{{v.sex}}</td>
            <td>{{v.address}}</td>
            <td>{{v.qq}}</td>
            <td>{{v.email}}</td>
        </tr>
    </table>
</div>
<script>
    new Vue({
        el: "#app",
        data: {
            linkManList: []
        },
        methods: {
            initData() {
                axios.get("/linkman/findAll").then(res => {
                    console.log(res.data.result);
                    this.linkManList = res.data.result;
                })
            }
        },
        created() {
            this.initData();
        }
    })
</script>
</body>
</html>